#! /bin/bash
SCRIPT_DIR=$(cd `dirname $0`; pwd)
echo "======== 一键完成全部数据的备份和恢复工作 ============="
echo "执行远程mongo数据备份..."
bash ${SCRIPT_DIR}/remotemongoback-full.sh
echo "远程备份完成!"
echo "将远程数据同步到本地..."
bash ${SCRIPT_DIR}/rsyncback.sh
echo "本地同步完成!"
echo "使用本地数据构影子库..."
bash ${SCRIPT_DIR}/mongoshadow.sh ecg-full
echo "影子库构建完成！"
echo "影子库数据记录数统计："
mongo 127.0.0.1:27017/ecg-full _count.js

